//
//  WLSuportFileFormat.m
//  WanLian
//
//  Created by 123456 on 2019/1/15.
//  Copyright © 2019 wanlian. All rights reserved.
//

#import "WLSuportFileFormat.h"

@implementation WLSuportFileFormat

+ (BOOL)photoSupportFormat:(NSString *)fileName {
    NSString *curFormate = fileName.pathExtension;
    NSArray *formatesArr = @[@"png", @"jpg", @"jpeg", @"bmp", @"gif", @"heic"];
    curFormate = curFormate.lowercaseString;
    for (NSString *formate in formatesArr) {
        if ([curFormate isEqualToString:formate]) {
            return YES;
        }
    }
    return NO;
    
}

+ (BOOL)voiceSupportFormat:(NSString *)fileName {
    
    NSString *curFormate = fileName.pathExtension;
    NSArray *formatesArr = @[];
    for (NSString *formate in formatesArr) {
        if ([curFormate isEqualToString:formate]) {
            return YES;
        }
    }
    return NO;
}

+ (BOOL)videoSupportFormat:(NSString *)fileName {
    NSString *curFormate = fileName.pathExtension;
    NSArray *formatesArr = @[];
    for (NSString *formate in formatesArr) {
        if ([curFormate isEqualToString:formate]) {
            return YES;
        }
    }
    return NO;
}
@end
